GetAreaOfGridFloat Function

private function GetAreaOfGridFloat(grid) result(area)

Description compute area (m2) of grid excluding nodata

Arguments

Type IntentOptional Attributes Name
type(grid_real), intent(in) :: grid

Return Value real(kind=float)


Variables

Type Visibility Attributes Name Initial
integer(kind=short), public :: i
integer(kind=short), public :: j

Source Code

FUNCTION GetAreaOfGridFloat &
!
(grid) &
!
RESULT(area)

IMPLICIT NONE

!arguments with intent(in):
TYPE(grid_real), INTENT (IN)   :: grid  

!Local declarations:
REAL (KIND = float) :: area
INTEGER (KIND = short) :: i, j
!------------------------------------end of declarations-----------------------
area = 0.

DO i = 1, grid % idim
  DO j = 1, grid % jdim
    IF (grid % mat (i,j) /= grid % nodata) THEN
      area = area + CellArea (grid, i, j)
    END IF
  END DO
END DO


END FUNCTION GetAreaOfGridFloat